package com.bloveoa.zkkd.service.impl;

import com.bloveoa.zkkd.doman.TokenRemainingModel;
import com.bloveoa.zkkd.repository.TokenRemainingRepository;
import com.bloveoa.zkkd.service.TokenRemainingService;
import org.springframework.stereotype.Service;

@Service
public class TokenRemainingServiceImpl implements TokenRemainingService {

    private final TokenRemainingRepository remainingRepository;

    public TokenRemainingServiceImpl(TokenRemainingRepository remainingRepository) {
        this.remainingRepository = remainingRepository;
    }

    public TokenRemainingModel queryModel(){
        TokenRemainingModel tokenRemainingModel = remainingRepository.queryById(1);
        return tokenRemainingModel;
    }
    public TokenRemainingModel saveModel(TokenRemainingModel model){
        TokenRemainingModel tokenRemainingModel = remainingRepository.save(model);
        return tokenRemainingModel;
    }
}
